<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        [v-cloak]{
            display: none;
        }
    </style>
</head>
<body>
<div id="example">
    <p ref="content">atguigu.com</p>
    <button @click="hint">提示</button>
    <p v-cloak>{{msg}}</p>
    <!--<p v-text="msg"></p>-->
</div>
<script type="text/javascript" src="../js/vue.js"></script>
<script type="text/javascript">
    alert("---")
    new Vue({
       el: "#example",
       data: {
            msg: "尚硅谷"
       },
        methods:{
           hint(){
               alert(this.$refs.content.textContent);
           }
        }
    });
</script>
</body>
</html>